diff options
| author | Alberto Duarte Delgado <alberto@albertoduarte.com> | 2026-04-21 12:22:35 +0100 |
|---|---|---|
| committer | Alberto Duarte Delgado <alberto@albertoduarte.com> | 2026-04-21 12:22:35 +0100 |
| commit | c685ee8dd304b53c54b3661c2dc96f470af25737 (patch) | |
| tree | 914e00f27263292a9d611d4c3ac08828d2151a16 /src/app/(protected)/offices/[officeId].tsx | |
| parent | be90a5f202f80bb423c6e0aaf1c4d5feca668f01 (diff) | |
feat(offices): restaurar filtro de favoritos fixes #14
Diffstat (limited to 'src/app/(protected)/offices/[officeId].tsx')
| -rw-r--r-- | src/app/(protected)/offices/[officeId].tsx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/app/(protected)/offices/[officeId].tsx b/src/app/(protected)/offices/[officeId].tsx index fbcd9f8..caedb05 100644 --- a/src/app/(protected)/offices/[officeId].tsx +++ b/src/app/(protected)/offices/[officeId].tsx @@ -45,7 +45,7 @@ export default function OfficeDetailScreen() { <Text style={styles.primaryButtonText}>Reintentar</Text> </Pressable> - <Link href="/(protected)/offices" asChild> + <Link href="/offices" asChild> <Pressable style={styles.secondaryButton}> <Text style={styles.primaryButtonText}>Volver</Text> </Pressable> @@ -55,12 +55,13 @@ export default function OfficeDetailScreen() { } const isFav = favoriteOfficeIdsSet.has(office.id); + const isAvailable = office.available ?? true; return ( <ScrollView contentContainerStyle={styles.container}> <View style={styles.content}> {/* HEADER */} - <Link href="/(protected)/offices" asChild> + <Link href="/offices" asChild> <Pressable> <Text style={styles.back}>← Volver a espacios</Text> </Pressable> @@ -90,16 +91,16 @@ export default function OfficeDetailScreen() { <View style={[ styles.badge, - office.available && styles.badgeActive, + isAvailable && styles.badgeActive, ]} > <Text style={[ styles.badgeText, - office.available && styles.badgeTextActive, + isAvailable && styles.badgeTextActive, ]} > - {office.available ? 'Disponible' : 'Ocupado'} + {isAvailable ? 'Disponible' : 'Ocupado'} </Text> </View> </View> @@ -321,4 +322,4 @@ const styles = StyleSheet.create({ padding: theme.spacing.md, borderRadius: theme.radius.md, }, -});
\ No newline at end of file +}); |